/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

public class User extends CId{
    public User(){}    
    
    private String userName;
    private String passWord;
    private Boolean active;
    private int groupUser;
    private String ho_ten;
    private int orderType;
    public void setOrderType(int order){
        this.orderType = order;
    }    
    public int getOrderType(){
        return this.orderType;
    }
    
    public void setHoTen(String ht){
        this.ho_ten = ht;
    }
    public String getHoTen(){
        return this.ho_ten;
    }
    
    public void setUserName(String userName){
        this.userName = userName;
    }
    
    public String getUserName(){
        return this.userName;
    }
    public void setPassword(String password){
        this.passWord = password;
    }
    public String getPassWord(){
        return this.passWord;
    }
    public void setActive(Boolean active){
        this.active= active;
    }
    public Boolean getActive(){
        return this.active;
    }
    public void setGroupUser(int groupId){
        this.groupUser = groupId;                
    }
    public int getGroupUser(){
        return this.groupUser;
    }
    
    public String toString(){
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append("{");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.id,this.getId() ));
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.user_name,this.getUserName()));
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.group_id,this.getGroupUser()));
        sBuilder.append(",");
        sBuilder.append(String.format("\"%s\" :\" %s \"",CFields.active,this.getActive()));
        sBuilder.append("}");
        return sBuilder.toString();
    }
}
